package com.project.schedule;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.project.service.activityuser.ActivityUserService;

@Component
public class ActivityReminderScheduledTask {
	
	private static final Logger logger = LoggerFactory.getLogger(ActivityReminderScheduledTask.class);
	
	@Autowired
	private ActivityUserService activityUserService;
	
	@Scheduled(cron="0 0 9 * * ?") //每天9点执行
	public void activityReminderScheduled(){
		logger.info("活动开始24小时前的短信提醒activityReminderScheduled，定时器启动-----------------");
		activityUserService.sendSmsForActivityUserReminder();
		logger.info("活动开始24小时前的短信提醒activityReminderScheduled，定时器结束-----------------");
	}

}
